<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd">

  <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
  
    <property name="processEngineName" value="HistoryCleanupBatchTest-engine" />
  
    <property name="jdbcUrl" value="jdbc:h2:mem:HistoryCleanupBatchTest;DB_CLOSE_DELAY=1000" />
    <property name="jdbcDriver" value="org.h2.Driver" />
    <property name="jdbcUsername" value="sa" />
    <property name="jdbcPassword" value="" />
    
    <!-- Database configurations -->
    <property name="databaseSchemaUpdate" value="create-drop" />
    
    <!-- job executor configurations -->
    <property name="jobExecutorActivate" value="false" />
    
    <!-- history level -->
    <property name="history" value="${history.level}" />
    
    <!-- turn off metrics reporter -->
    <property name="dbMetricsReporterActivate" value="false" />
    <property name="telemetryReporterActivate" value="false" />
    <property name="taskMetricsEnabled" value="false" />
    
    <!-- History cleanup for batch operations -->
    <property name="batchOperationHistoryTimeToLive" value="P5D"/>

    <property name="batchOperationsForHistoryCleanup">
      <map>
        <entry key="instance-migration" value="P10D" />
        <entry key="instance-modification" value="P7D" />
        <entry key="uknown-operation" value="P3D" />
      </map>
    </property>
  </bean>

</beans>
